import asyncio


async def delay_func():
    await asyncio.sleep(1)


async def execute1():
    task1 = asyncio.create_task(delay_func())
    task2 = asyncio.create_task(delay_func())

    await task1
    await task2


async def execute2():
    task1 = asyncio.create_task(delay_func())
    task2 = asyncio.create_task(delay_func())

    await asyncio.gather(task1, task2)


async def execute3():
    task1 = asyncio.create_task(delay_func())
    task2 = asyncio.create_task(delay_func())
    tasks = [task1, task2]

    await asyncio.gather(*tasks)


async def execute4():
    tasks = [delay_func() for _ in range(3)]

    for done in asyncio.as_completed(tasks):
        await done

